package com.example.runlian.service.impl;

import com.example.runlian.mapper.DesInfoMapper;
import com.example.runlian.pojo.DesInfo;
import com.example.runlian.pojo.PageInfo;
import com.example.runlian.service.DesInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  描述信息逻辑处理 实现
 */
@Service
public class DesInfoServiceImpl implements DesInfoService {
    @Autowired
    private DesInfoMapper desInfoMapper;

    @Override
    public List<DesInfo> getDesInfo(PageInfo pageInfo) {
        return desInfoMapper.queryDesInfoByPage(pageInfo);
    }

    @Override
    public List<DesInfo> queryDesInfoByPage(PageInfo pageInfo) {
        return desInfoMapper.queryDesInfoByPage(pageInfo);
    }

    @Override
    public Integer queryDesInfoNum() {
        return desInfoMapper.queryDesInfoNum();
    }

    @Override
    public Integer updateDesInfo(DesInfo desInfo) {
        return desInfoMapper.updateDesInfoByDid(desInfo);
    }

    @Override
    public Integer addDesInfo(DesInfo desInfo) {
        return desInfoMapper.addDesInfo(desInfo);
    }

    @Override
    public Integer deleteDesInfo(Integer did) {
        return desInfoMapper.deleteDesInfo(did);
    }

    @Override
    public Integer queryDesInfoNumByMid(Integer mid) {
        return desInfoMapper.queryDesInfoNumByMid(mid);
    }
}
